
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			console.log("内部脚本")//在控制台中输出内容
		</script>
	
		<script src="js01.js" type="text/javascript"></script>
	</head>
	<body>
		<a href="javascript:alert('行内脚本')">文本</a>
		<button type="button" onclick="javascript:alert('行内脚本')">按钮</button>
		
	<script type="text/javascript">//在网页中输出内容
		document.write("<h1 style='color:red;'>红色<h1>")
		document.write('你好，"pzhu"')
		document.write("<br>")
		document.write('你好，\"pzhu\"')
		document.write("<br>")
		document.write('你好，\'pzhu\'')
		var n1=1;
	console.log(n1);
	console.log(n1+"")
	console.log(n1.toString())
	
	var n2;
	console.log(n2);
	console.log(n2+"")
	//console.log(n2.toString())error，不能传入空参数
	
	var n3=null;
	console.log(n3);
	console.log(n3+"")
	//console.log(n3.toString())
	var s1="1"
		console.log("s1")
	console.log(Number(s1))
	var s2="1.1"
		console.log("s2")
	console.log(s2-0)
	console.log(parseInt(s2))
	console.log(Number(s2))
	var s3="1.1.1.1"
		console.log("s3")
	console.log(s3-0)
	console.log(parseFloat(s3))
	console.log(Number(s3))
	
	
	
	</script>	
		
		
		
	</body>
</html>
